﻿@{
    ViewBag.Title = "后台管理系统";
}

@section styles{

}

<div class="layui-fluid">


    <div class="layui-card layui-hide">
        <div class="layui-card-header">
            富文本编辑器
        </div>
        <div class="layui-card-body">
            <div style="width: 800px;">
                <textarea id="txtBody">hello world
        </textarea>
            </div>
        </div>

        <div class="layui-card-header">
            图片上传
        </div>

        <div class="layui-card-body">
            <img src="" id="imgUrl_show" class="edit-img"/>
            <input type="text" id="imgUrl"/>
            <button type="button" class="layui-btn" id="imgUrl_btn">
                <i class="layui-icon">&#xe67c;</i>上传图片
            </button>
        </div>
        <div class="layui-card-header">
            省市县
        </div>
        <div class="layui-card-body">
            <form class="layui-form">
                <select id="province" lay-ignore name="province"></select>
                <select id="city" lay-ignore name="city"></select>
                <select id="county" lay-ignore name="county"></select>
            </form>
        </div>
    </div>


</div>

@section scripts{
    <script src="~/lib/kindeditor/kindeditor-all-min.js"></script>
    <script src="~/js/selectArea.js"></script>
    <script>
        //富文本编辑器
        var bodyEditor = null;
        //bodyEditor.html();
        KindEditor.ready(function(K) {
            bodyEditor = K.create('#txtBody',
                {
                    resizeType: 1,
                    height: '200px;',
                    width: '100%',
                    uploadJson: '/upload/upload_json',
                    fileManagerJson: '/upload/file_manager_json',
                    allowFileManager: true,
                    themeType: 'simple',
                    items: editorAllItems,
                });
        });
        //单个上传按钮
        uploadImage("imgUrl");
    
        new selectArea($("#province"), $("#city"), $("#county")).init();
    </script>
}